{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Principal Component Analysis (PCA)\n",
    "\n",
    "[StatQuest: Principal Component Analysis (PCA), Step-by-Step](https://www.youtube.com/watch?v=FgakZw6K1QQ&t=7s)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-02-07T14:39:32.744860Z",
     "start_time": "2020-02-07T14:39:32.136885Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Gene 1</th>\n",
       "      <th>Gene 2</th>\n",
       "      <th>Gene 3</th>\n",
       "      <th>Gene 4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Mouse 1</th>\n",
       "      <td>10</td>\n",
       "      <td>6.0</td>\n",
       "      <td>12.0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 2</th>\n",
       "      <td>11</td>\n",
       "      <td>4.0</td>\n",
       "      <td>9.0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 3</th>\n",
       "      <td>8</td>\n",
       "      <td>5.0</td>\n",
       "      <td>10.0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 4</th>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.5</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 5</th>\n",
       "      <td>2</td>\n",
       "      <td>2.8</td>\n",
       "      <td>1.3</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 6</th>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Gene 1  Gene 2  Gene 3  Gene 4\n",
       "Mouse 1      10     6.0    12.0       5\n",
       "Mouse 2      11     4.0     9.0       7\n",
       "Mouse 3       8     5.0    10.0       6\n",
       "Mouse 4       3     3.0     2.5       2\n",
       "Mouse 5       2     2.8     1.3       4\n",
       "Mouse 6       1     1.0     2.0       7"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "dataset_1 = pd.DataFrame({'Gene 1': [10, 11, 8, 3, 2, 1],\n",
    "                          'Gene 2': [6, 4, 5, 3, 2.8, 1],\n",
    "                          'Gene 3': [12, 9, 10, 2.5, 1.3, 2],\n",
    "                         'Gene 4':[5, 7, 6, 2, 4, 7]}, \n",
    "                         index = ['Mouse 1','Mouse 2','Mouse 3','Mouse 4','Mouse 5','Mouse 6'])\n",
    "dataset_1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "先看二维数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-02-07T14:39:33.020310Z",
     "start_time": "2020-02-07T14:39:32.777773Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "dataset_1.plot(kind=\"scatter\", x=\"Gene 1\", y=\"Gene 2\", c = 'g');"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "第一步：计算中心"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-02-07T14:39:34.616025Z",
     "start_time": "2020-02-07T14:39:34.607047Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Gene 1</th>\n",
       "      <th>Gene 2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Mouse 1</th>\n",
       "      <td>10</td>\n",
       "      <td>6.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 2</th>\n",
       "      <td>11</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 3</th>\n",
       "      <td>8</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 4</th>\n",
       "      <td>3</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 5</th>\n",
       "      <td>2</td>\n",
       "      <td>2.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 6</th>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         Gene 1  Gene 2\n",
       "Mouse 1      10     6.0\n",
       "Mouse 2      11     4.0\n",
       "Mouse 3       8     5.0\n",
       "Mouse 4       3     3.0\n",
       "Mouse 5       2     2.8\n",
       "Mouse 6       1     1.0"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = dataset_1[['Gene 1', 'Gene 2']]\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-02-07T14:40:49.547919Z",
     "start_time": "2020-02-07T14:40:49.543406Z"
    }
   },
   "outputs": [],
   "source": [
    "data_mean = data.values.mean(axis = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-02-07T14:40:54.774888Z",
     "start_time": "2020-02-07T14:40:54.764905Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Gene 1</th>\n",
       "      <th>Gene 2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Mouse 1</th>\n",
       "      <td>4.166667</td>\n",
       "      <td>2.366667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 2</th>\n",
       "      <td>5.166667</td>\n",
       "      <td>0.366667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 3</th>\n",
       "      <td>2.166667</td>\n",
       "      <td>1.366667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 4</th>\n",
       "      <td>-2.833333</td>\n",
       "      <td>-0.633333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 5</th>\n",
       "      <td>-3.833333</td>\n",
       "      <td>-0.833333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mouse 6</th>\n",
       "      <td>-4.833333</td>\n",
       "      <td>-2.633333</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           Gene 1    Gene 2\n",
       "Mouse 1  4.166667  2.366667\n",
       "Mouse 2  5.166667  0.366667\n",
       "Mouse 3  2.166667  1.366667\n",
       "Mouse 4 -2.833333 -0.633333\n",
       "Mouse 5 -3.833333 -0.833333\n",
       "Mouse 6 -4.833333 -2.633333"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dataset_2 = pd.DataFrame(data - data_mean)\n",
    "dataset_2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-02-07T14:40:57.776248Z",
     "start_time": "2020-02-07T14:40:57.656604Z"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEKCAYAAAASByJ7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAENBJREFUeJzt3X1sXXd9x/H3Z3FSTCDztN5R1hbfjjFEyZAYaQd0WhEkU2FVAxtoBIGYsFaGCqIbiKfuD/7ZHxMSRAIkmmHEVooRA/qwASqtgDIQtElLoSmlrOpcSAFxASUgz2vi8N0fPqVOlzhu43OPH94vKZLv797c8zmqmo9/5+F3UlVIkvQbXQeQJK0MFoIkCbAQJEkNC0GSBFgIkqSGhSBJAiwESVLDQpAkARaCJKkx0nWAR+P000+vfr/fdQxJWlVuu+22n1ZV72SfW1WF0O/32bdvX9cxJGlVSXL/Uj7nISNJ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wT0m+BdwBPP+Rn0tyXpIDwCuAK5Os9VVTtQq42qkkCXCGIElqWAiSJMBCkCQ1LARJEmAhSJIaFoIkCbAQJEkNC0GSBMD/AeNyHwiQm6MpAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "dataset_2.plot(kind=\"scatter\", x=\"Gene 1\", y=\"Gene 2\", c = 'g');"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "nbTranslate": {
   "displayLangs": [
    "*"
   ],
   "hotkey": "alt-t",
   "langInMainMenu": true,
   "sourceLang": "en",
   "targetLang": "fr",
   "useGoogleTranslate": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
